home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_5 / issue_06 / benchmarks / c_source / tmath < prev    next >
Encoding:
Text File  |  1991-09-15  |  489 b   |  25 lines

  1. /* triglog */
  2. #include <stdio.h>
  3. #include <time2.h>
  4.  
  5. extern double sin();
  6. extern double cos();
  7. extern double atan();
  8. extern double log();
  9.  
  10. main()
  11. {
  12.         int i;
  13.         double x,y;
  14.     clock_t start, end;
  15.     start=clock();
  16.     x = 0.0;
  17.     y = 9.9;
  18.     printf("Start\n");
  19.     for (i=0; i<1000; i++)
  20.         x = x + sin(atan(cos(log(y))));
  21.     printf("finish %f\n",x);
  22.     end=clock();
  23.     printf("The timing for this trigonmetric calculation test was: %f \n", (end-start) / CLK_TCK);
  24. }
  25.